@import "~scss/variables";

.sw-cms-el-product-slider {
    width: 100%;

    .sw-cms-el-product-slider__title {
        margin: 20px 0;
    }

    &.has--navigation-indent {
        &.has--border {
            margin: 20px;
        }

        .sw-cms-el-product-slider__content {
            display: grid;
            grid-template-columns: 32px 1fr 32px;
            gap: 0 8px;
        }

        .sw-cms-el-product-slider__title {
            margin: 20px 40px;
        }
    }

    .sw-cms-el-product-slider__navigation-button {
        translate: 0 20px;
    }

    .has--arrow-inside {
        position: absolute;
        height: 65px;
        left: 0;
        top: 50%;
        translate: 0 -50%;
        z-index: $z-index-overlay;
        opacity: 0.5;
        background-color: $color-gray-200;

        &.is--right-arrow {
            left: unset;
            right: 0;
        }

        &:hover {
            opacity: 1;
        }
    }

    &.has--border {
        padding: 20px;
        border: 1px solid $color-gray-300;
        border-radius: $border-radius-default;

        .sw-cms-el-product-slider__title {
            margin-top: 0;
        }
    }

    .sw-cms-el-product-slider__content {
        .sw-cms-el-product-slider__navigation {
            align-self: center;
            justify-self: center;
        }

        .sw-cms-el-product-slider__product-holder {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
            gap: 0 32px;
        }
    }
}
